package com.kerry.web;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.kerry.mapper.UserMapper;
import com.kerry.model.User;


@Controller
public class ViewUserController {
	
	
	@Autowired
	private UserMapper userMapper;
	
	@RequestMapping("/getUserList")
	public String getUsers(Model model) {
		List<User> users=userMapper.getAll();
		model.addAttribute("users", users);
		return "users";
	}
	

}
